3.1.6 \(\int \frac {\cot ^2(x)}{a+a \csc (x)} \, dx\) [6]

Optimal. Leaf size=15 \[ -\frac {x}{a}-\frac {\tanh ^{-1}(\cos (x))}{a} \]

[Out]

-x/a-arctanh(cos(x))/a

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3973, 3855} \begin {gather*} -\frac {x}{a}-\frac {\tanh ^{-1}(\cos (x))}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[x]^2/(a + a*Csc[x]),x]

[Out]

-(x/a) - ArcTanh[Cos[x]]/a

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3973

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\cot ^2(x)}{a+a \csc (x)} \, dx &=\frac {\int (-a+a \csc (x)) \, dx}{a^2}\\ &=-\frac {x}{a}+\frac {\int \csc (x) \, dx}{a}\\ &=-\frac {x}{a}-\frac {\tanh ^{-1}(\cos (x))}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 30, normalized size = 2.00 \begin {gather*} -\frac {x}{a}-\frac {\log \left (\cos \left (\frac {x}{2}\right )\right )}{a}+\frac {\log \left (\sin \left (\frac {x}{2}\right )\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^2/(a + a*Csc[x]),x]

[Out]

-(x/a) - Log[Cos[x/2]]/a + Log[Sin[x/2]]/a

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 18, normalized size = 1.20

method result size
default \(\frac {-2 \arctan \left (\tan \left (\frac {x}{2}\right )\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right )}{a}\) \(18\)
risch \(-\frac {x}{a}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{a}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{a}\) \(33\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^2/(a+a*csc(x)),x,method=_RETURNVERBOSE)

[Out]

1/a*(-2*arctan(tan(1/2*x))+ln(tan(1/2*x)))

________________________________________________________________________________________

Maxima [A]
time = 0.47, size = 30, normalized size = 2.00 \begin {gather*} -\frac {2 \, \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} + \frac {\log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-2*arctan(sin(x)/(cos(x) + 1))/a + log(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

Fricas [A]
time = 2.98, size = 25, normalized size = 1.67 \begin {gather*} -\frac {2 \, x + \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/2*(2*x + log(1/2*cos(x) + 1/2) - log(-1/2*cos(x) + 1/2))/a

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cot ^{2}{\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**2/(a+a*csc(x)),x)

[Out]

Integral(cot(x)**2/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 17, normalized size = 1.13 \begin {gather*} -\frac {x}{a} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+a*csc(x)),x, algorithm="giac")

[Out]

-x/a + log(abs(tan(1/2*x)))/a

________________________________________________________________________________________

Mupad [B]
time = 0.28, size = 45, normalized size = 3.00 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {4}{4\,\mathrm {tan}\left (\frac {x}{2}\right )+4}-\frac {4\,\mathrm {tan}\left (\frac {x}{2}\right )}{4\,\mathrm {tan}\left (\frac {x}{2}\right )+4}\right )}{a}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^2/(a + a/sin(x)),x)

[Out]

(2*atan(4/(4*tan(x/2) + 4) - (4*tan(x/2))/(4*tan(x/2) + 4)))/a + log(tan(x/2))/a

________________________________________________________________________________________